Ext.define('MdxDefine.views.MdxGridPanel', {
	id : 'mdxGridPanel',
	extend : 'Ext.grid.Panel',
	alias : 'widget.MdxGridPanel',
	requires : [ 'MdxDefine.stores.MdxGridStore' ],
	columnLines : true,
	viewConfig : {
		stripeRows : true
	},
	initComponent : function() {
		this.store = MdxDefine.stores.MdxGridStore;
		this.columns = [ {
			locked : true
		} ];
		this.callParent();
	},
	loadResultSet : function(resultSetJson) {
		// var json = Ext.JSON.decode(resultSetJson); //
		// 获得后台传递json
		var json = eval("(" + resultSetJson + ")");
		var _store = Ext.create('Ext.data.Store', {
			fields : json.fieldsNames,
			data : json.data
		});
		this.reconfigure(_store, json.columns);
	}
});
